<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="keywords" content="">
  <meta name="description" content="">
  <title>修改菜单</title>
  <link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
  <link rel="stylesheet" href="/static/include/css/style.css">
  <style type="text/css">
    .ico-list .fa{
      margin: 5px;
      padding: 5px;
      cursor:pointer;
      font-size: 18px;
      width: 28px;
      border-radius: 3px;
    }
    .ico-list .fa:hover {
      background-color: #1d9d74;
      color: #ffffff;}
  </style>
</head>
<body >
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="menuFormBox">

</div>

<script id="menuFormTpl" type="text/html">
  <form class="form-horizontal m" id="editForm" action="/admin/menu">
    <input name="menuId" type="hidden" value="{{d.menuId || ''}}"/>
    <input id="treeId" name="parentId" type="hidden" value="{{d.parentId || '-1'}}"/>
    <input type="hidden" name="oper" id="oper" value="{{d.oper}}"/>
    <div class="form-group">
      <label class="col-sm-3 control-label">上级菜单：</label>
      <div class="col-sm-8">
        <div class="input-group">
          <input class="form-control" type="text" onclick="selectMenuTree()" id="treeName" readonly value="{{d.parentName || ''}}">
          <span class="input-group-addon"><i class="fa fa-search"></i></span>
        </div>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label is-required">菜单类型：</label>
      <div class="col-sm-8">
        {{# if(d.type == '0' ){ }}
        <label class="radio-box"><input type="radio" field="type" name="type" value="0" checked/> 菜单</label>
        <label class="radio-box"><input type="radio" field="type" name="type" value="1"/> 按钮</label>
        {{# } else { }}
        <label class="radio-box"><input type="radio" field="type" name="type" value="0"/> 菜单</label>
        <label class="radio-box"><input type="radio" field="type" name="type" value="1" checked/> 按钮</label>
        {{# } }}
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label is-required">菜单名称：</label>
      <div class="col-sm-8">
        <input class="form-control" type="text" name="name" id="name" value="{{ d.name || ''}}" maxlength="20" required>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">组件路径：</label>
      <div class="col-sm-8">
        <input id="path" name="path" class="form-control" type="text" value="{{ d.path || ''}}" maxlength="100">
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">权限标识：</label>
      <div class="col-sm-8">
        <input id="permission" name="permission" class="form-control" type="text" value="{{d.permission || ''}}"
               maxlength="50">
        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>
						控制器中定义的权限标识，如：@PreAuthorize("@pms.hasPermission('')")</span>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label is-required">显示排序：</label>
      <div class="col-sm-8">
        <input class="form-control" type="text" name="sort"
               value="{{ (d.sort == null || d.sort == undefined) ? '' : d.sort }}" maxlength="3" required>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label">图标：</label>
      <div class="col-sm-8">
        <input id="icon" name="icon" class="form-control" type="text"
               placeholder="选择图标" value="{{d.icon || ''}}" readonly="readonly">
        <div class="ms-parent" style="width: 100%;">
          <div class="icon-drop animated flipInX"
               style="display: none; max-height: 200px; overflow-y: auto">
            <div id="iconList"></div>
          </div>
        </div>
      </div>
    </div>
  </form>
</script>
<script src="/static/include/js/footer.js"></script>
<script src="/static/pages/sysadm/menu/menuEdit.js"></script>
</body>
</html>
